<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        .box {
            width: 790px;
            height: 340px;
            margin: 100px auto;
            position: relative;
        }
        .box:hover .arr{
            display: block;
        }
        .screen {
            position: relative;
            width: 100%;
            height: 100%;
        }
        .screen img {
            position: absolute;
            left: 0;
            top: 0;
            display: none;
        }
        .screen img:first-child {
            display: block;
        }
        .arr {
            display: none;
        }
        .arr .left {
            position: absolute;
            left: 10px;
            top: 35%;
            z-index: 2;
        }
        .arr .right {
            position: absolute;
            right: 10px;
            top: 35%;
            z-index: 2;
        }

    </style>
</head>
<body>
    <div class="box">
        <div class="screen">
            <img src="images/1.jpg" alt="">
            <img src="images/2.jpg" alt="">
            <img src="images/3.jpg" alt="">
            <img src="images/4.jpg" alt="">
            <img src="images/5.jpg" alt="">
            <img src="images/6.jpg" alt="">
            <img src="images/7.jpg" alt="">
            <img src="images/8.jpg" alt="">
        </div>
        <div class="arr">
            <div class="left"><img src="images/prev.png" alt=""></div>
            <div class="right"><img src="images/next.png" alt=""></div>
        </div>
    </div>
    <script src='../jquery-1.12.4.js'></script>
    <script>
        $(function(){
            var index = 0;
            $('.right').click(function(){
                index++;
                if(index == $('.screen img').length){
                    index = 0;
                }
                $('.screen img').eq(index).fadeIn(1000).siblings().fadeOut();
            })
        })
    </script>
</body>
</html>